﻿using Rail.Demo.Viewer;

namespace Rail.Demo.Controller
{
    public class CreateDemoFormCommand2: Base.BaseCommand
    {
        public override void Execute(PureMVC.Interfaces.INotification notification)
        {
            DemoForm2 df = new DemoForm2();
            DemoFormMediator2 dfm = new DemoFormMediator2(df);
            //重复调用RegisterMediator方法前必须调用RemoveMediator
            Facade.RemoveMediator(dfm.MediatorName);
            Facade.RegisterMediator(dfm);
            df.ShowDialog();
        }
    }
}
